package work20241221;

/**
 * @author zdl
 * @date 2024/12/21
 */
class MyThread1 extends Thread {
    @Override
    public void run() {
        for (int i = 1; i < 10; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j + "*" + i + "=" + j * i + "\t");
            }
            System.out.println();
        }
    }
}

class MyThread2 extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 9; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}

public class Demo2 {
    public static void main(String[] args) {
        new MyThread1().start();
        new MyThread2().start();
    }
}
